home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 May
/
Ahoy_Magazine_87-05_1987_Double_L_Side_B.d64
/
read dir.txt
< prev
next >
Wrap
Text File
|
2022-10-26
|
1KB
|
42 lines
READ DIRECTORY
by David Stidolph
This COMAL 0.14 program can be used
to read a disk directory. The program
prints the directory to the screen or
to a printer. The program uses the
read'block and disk'get'init
procedures from COMAL Today #15. The
information needed for the
get'entries procedure is contained in
the article, Unscratching Files in
COMAL Today #13. It isn't hard to
write a new program when most of the
work has been done for you. All you
need to do find out what procedures
are available, and then practice
putting them together.
This directory program is not as
versatile as directory'probe from
Today Disk #13, but it has a few
advantages of its own. If you only
need a print out of a disk directory,
this program is shorter and easier to
use. This program may also be adapted
for other uses. All the directory
entries are stored in an array. You
could write a routine to see if a
particular program is on a disk by
comparing file names to the one you
are looking for. You could write
routines to sort the names or to list
all files of a given type. You could
even store the file names on a disk
to keep track of which programs are
on which disks. Of course most of
this work has been done for you too.
It is in the book/disk set, Captain
COMAL Gets Organized.